<!--#include file="Config.asp"-->
<!--#include file="emp_is.asp"-->
<!--#include file="Header.asp"-->
<%
EditMenuID=cint(Request("EditMenuID"))
'Modify Record
Action=Trim(request("Action"))
If Action="Mod" And EditMenuID<>"" Then
sql= "SELECT * FROM basic_treeNav WHERE id="&EditMenuID
rs.open sql,conn,3,3
rs("name") =Trim(Request("name"))
rs("EnName") =Trim(Request("EnName"))
rs("url") =Trim(Request("url"))
rs("fatherID") =int(Request("fatherID"))
rs("urltarget") =Trim(Request("urltarget"))
rs("comment") =Trim(Request("comment"))
rs("isshow") =int(Request("isshow"))
rs("paixu") =int(Request("paixu"))
rs("iconCls") =Trim(Request("iconCls"))

rs.Update
rs.close
'response.redirect Request.ServerVariables("Http_referer")
'response.redirect "menuadmin.asp"
Msg="修改成功"
End If

'Delete Record
If Action="Del" Then
EditMenuID=Int(request("EditMenuID"))
sql= "delete  FROM basic_treeNav WHERE id="&EditMenuID
conn.execute (sql)
'response.redirect Request.ServerVariables("Http_referer")
response.redirect "_menuadmin.asp"
End If

sql="select * from basic_treeNav where ID='"&EditMenuID&"' order by paixu"
rs.open sql,conn,1,1
if EditMenuID<>0 Then

if int(rs("fatherID"))<>0 Then
fatherID=int(rs("fatherID"))
Else
fatherID=int(rs("ID"))
End if

%>

<div align='center'>
<div class="easyui-panel" title="操作" style="width:600px;padding:10px;">

<table class="table table-border table-bordered table-bg table-hover table-sort">
<!-- 修改 -->
<form method="post" action="?Action=Mod&EditMenuID=<%=Trim(rs("ID"))%>">
<tr>
<td colspan='2'>
<input type="submit" name="Submit" value="保存修改">
<font color="#ff0000"><u><%=msg%></u></font>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="_menuadmin.asp?fatherID=<%=fatherID%>"><b><u>返回菜单管理</u></b></a>
</td>
</tr>

<tr>
<td width='100'>菜单名称</td >
<td ><input type="text" name="name" value="<%=Trim(rs("name"))%>" size='50'></td >
</tr>
<tr>
<td width='100'>iconCls</td>
<td >
<select name="iconCls" style="width:250px;">
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select * from EasyUI_iconCls order by id desc"
rs_s.open sql_s,conn,1
 for i=1 to rs_s.recordcount
%>
<option value="<%=trim(rs_s("iconCls"))%>" <%If trim(rs_s("iconCls"))=Trim(rs("iconCls")) then%>selected<%End if%> ><%=trim(rs_s("ID"))%>.<%=Trim(rs_s("iconCls"))%></option>
<%
rs_s.movenext
next
rs_s.close
%>
<option value="">不设置iconCls</option>
</select>

<a href="_iconClsAdmin.ASP" target='_blank'>iconCls列表</a>

</td >
</tr>


<tr>
<td>&nbsp;</td >
<td ><a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'<%=Trim(rs("iconCls"))%>'"><%=Trim(rs("iconCls"))%></a>
</td >
</tr>
<tr>
<td width='100'>英文名称</td >
<td ><input type="text" name="EnName" value="<%=Trim(rs("EnName"))%>" size='50'></td >
</tr>
<tr>
<td >URL地址</td >
<td ><input type="text" name="url" value="<%=Trim(rs("url"))%>" size='50'></td >
</tr>
<tr>
<td >弹窗位置</td >
<td >
<select name="URLTarget">
<option value="<%=Trim(rs("UrlTarget"))%>"><%=Trim(rs("UrlTarget"))%></option>
<option value="FrmMain">FrmMain</option>
<option value="_blank">_blank</option>
<option value="_self">_self</option>
<option value="FrmLeftMenu">FrmLeftMenu</option>
</select>
</td >
</tr>
<tr>
<td >分类</td >
<td >
<select name="FatherID">
<option value="0">0.顶级菜单</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select * from basic_treeNav where fatherID=0"
rs_s.open sql_s,conn,3
if not rs_s.eof then
 for i=1 to rs_s.recordcount
%>
<option value="<%=trim(rs_s("ID"))%>" <%if int(rs_s("ID"))=int(rs("fatherID")) then%>selected<%end if%>><%=trim(rs_s("ID"))%>.<%=rs_s("name")%></option>
<%
rs_s.movenext
next
set rs_s=Nothing
%>

<%end if%>
</select>
</td >
</tr>
<tr>
<td >
Comment</td >
<td ><input type="text" name="Comment" value="<%=Trim(rs("Comment"))%>"  size='50'>
</td >
</tr>
<tr>
<td >显示控制</td >
<td >
<input type="hidden" name="EditMenuID" value="<%=Trim(EditMenuID)%>">
<select name="isshow">
<option value="<%=int(rs("isshow"))%>"><%If Int(rs("isshow"))=1 then%>显示中<%else%>不显示<%End if%></option>
<option value="1">显示中</option>
<option value="0">不显示</option>
</select>
</td >
</tr>
<tr>
<td >
排序</td >
<td >
<input type="text" name="paixu" value="<%=int(rs("paixu"))%>"  size='50'>
</td >
</tr>
<tr>
<td colspan='2'>
<input type="submit" name="Submit" value="保存修改">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="_menuadmin.asp?fatherID=<%=fatherID%>"><b><u>返回菜单管理</u></b></a>

</td>
</tr>
</form>
</table>
<%else%>
<CENTER>系统无此数据！</CENTER>
<%
end if

rs.close
%>

</div>
</div>

<!--#include file="Footer.asp" -->
